/**
 * Change提交表单组件
 */
jx.plugin({
    name: 'jxswitchsubmit',
    create: function (ele, ops) {
        return {};
    },
    onInstance: function (e) {
        $(e.target).find('.jxswitchsubmit').each(function (i, v) {
            $(v).data('bootstrap-switch').options.onSwitchChange = function () {
                $(this).closest('form').find(':submit').click();
            };
        });
    }
});